<% @page_title = "多背一公斤 | 探访过的学校" %>

<% content_for(:sidebar) do -%>
  <h3 class="nt">
  	<%= link_to image_tag('/images/new_school.gif'), new_school_path %>
  </h3>

	<h3 class="nt">全部需要帮助的学校 <%= title_suffix %></h3>
	<div><%= link_to "浏览全部已认证学校", confirmed_schools_url %><br />
	<%= link_to "浏览等待验证的学校", unconfirmed_schools_url %><br />
	<%= link_to "查看学校归档", archives_schools_url %></div>
	<div>按地区浏览：</div>
	<div>
		<% @provinces.each do |province| -%>
		<a href="/schools;confirmed#province-<%= province.id %>">
			<%= province.title %>
		</a>
		<% end -%>
	</div>
	<%= render :file => 'searchers/index' %>
  
	<%= render :partial => 'help' %>

<% end -%>


<h3 class="nt">最近上传的学校照片 <%= title_suffix %></h3>
<div class="span-16">
<% @photos.each do |photo| -%>
  <dl class="obp">
    <dt><%= link_to image_tag(photo.public_filename(:small), :alt => photo.title),  photo_url(photo)%></dt>
    <dd>
			<% if photo.title? %>
			<span class="tip">标题：</span>
			<%= link_to photo.title, photo_url(photo.id) %>&nbsp;&nbsp;
			<% end %>
			<span class="tip">作者：</span><%= link_to photo.user.login, user_url(photo.user.id) %>
    </dd>
  </dl>
<% end -%>
</div>
<div class="clear"></div>

<h3 class="nt">学校的需求 <%= title_suffix %></h3>
<div style="line-height:2em;">
  <% tag_cloud @tags, %w(tag1 tag2 tag3 tag4) do |tag, css_class| -%>
    <%= link_to tag.name, requirements_schools_path(:name => tag.name), :class => css_class %>
  <% end -%>
</div>


<h3 class="nt">志愿者刚刚提交的学校 <%= title_suffix %></h3>
<div>
	<%= render :partial => 'school_table', :locals => {:schools => @validated_schools} %>
</div>

